package com.chinasofti.io;


import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Demo04 {
    public static void main(String[] args) throws IOException {
        //找不到文件抛出异常FileNotFoundException
        FileInputStream fis = new FileInputStream("java0419\\fos.txt");
        int by;
//        fis.read();//读取
        //by == -1;没数据
        while ((by = fis.read()) != -1){
            System.out.print((char)by);
        }
        fis.close();
    }
}
